import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listTask(query) {
  return request({
    url: '/hotel/task/list',
    method: 'get',
    params: query
  })
}

// 查询【请填写功能名称】详细
export function getTask(usageId) {
  return request({
    url: '/hotel/task/' + usageId,
    method: 'get'
  })
}

// 新增【请填写功能名称】
export function addTask(data) {
  return request({
    url: '/hotel/task',
    method: 'post',
    data: data
  })
}

// 修改【请填写功能名称】
export function updateTask(data) {
  return request({
    url: '/hotel/task',
    method: 'put',
    data: data
  })
}

// 删除【请填写功能名称】
export function delTask(usageId) {
  return request({
    url: '/hotel/task/' + usageId,
    method: 'delete'
  })
}

export function getMyTask(query) {
  return request({
    url: '/hotel/task/getMyTask',
    method: 'get',
    params: query
  })
}

export function getMyTaskSent(query) {
  return request({
    url: '/hotel/task/getMyTaskSent',
    method: 'get',
    params: query
  })
}

export function sendTask(data) {
  return request({
    url: '/hotel/task/sendTask',
    method: 'post',
    data: data
  })
}

export function getListNow() {
  return request({
    url: '/hotel/task/getListNow',
    method: 'get'
  })
}

export function getWorker() {
  return request({
    url: '/hotel/task/getWorker',
    method: 'get'
  })
}

export function getSupply() {
  return request({
    url: '/hotel/task/getSupply',
    method: 'get'
  })
}


export function workRate(data) {
  return request({
    url: '/hotel/workRate/workRate',
    method: 'post',
    data: data
  })
}

export function taskCancel(data){
  return request({
    url: '/hotel/task/taskCancel',
    method: 'post',
    data: data
  })
}


export function taskDone(data){
  return request({
    url: '/hotel/task/taskDone',
    method: 'post',
    data: data
  })
}

